package com.f5.management.dao;

import com.f5.management.entity.Parking;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ParkingDAO {
    List<Parking> list();

    List<Parking> listByCommunity(String name);

    List<Parking> freeParkings();

    Parking get(int id);

    Parking getBySerialNum(String number);

    int insert(Parking parking);

    void update(Parking parking);

    void delete(int id);

    // 总条数
    Long count();

    // 分页查询
    List<Parking> findByPage(@Param("start") Integer start, @Param("rows") Integer rows);
}
